<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class ContentAreas</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class ContentAreas</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">ContentAreas</p>
<p class="description"><p>the content areas class manages everything to  do with content areas</p><p>==== WIDGETS ====</p><p>Widgets are methods of adding content to a content area.  The content areas plugin only provides one default widget -  the content widget - which allows content to be added to a  content area with tinymce.</p><p>This class has built in support for adding your own widget  using a plugin. Some example types of widgets would be  image gallery, facebook anything like that.</p><p>Widgets are created by adding to the $plugin array. For  an example look at the ContentAreas plugin file. Widgets  must be added to the plugin array in the following format:</p><p>'admin' =&gt; array(  		'content_area_widgets' =&gt; array(  			array( 				'name' =&gt; 'Example Widget', 				'function' =&gt; 'function to be executed to display the widget'  			)  		) 	),  	'frontend' =&gt; array(  		'content_area_widgets' =&gt; array(  			array( 				'name' =&gt; 'Example Widget', 				'function' =&gt; 'function to be executed to display the widget'  			)  		) 	)</p><p>As you can see from the example above, each plugin can have  multiple widgets</p></p>
	<ul class="tags">
				<li><span class="field">todo:</span> add permissions support</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="__plugins---Content-Areas---ContentAreas.php.html">/_plugins/Content-Areas/ContentAreas.php</a> (line <span class="field">54</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																				<div class="method-definition">
					static 						<span class="method-result">instance</span>
										<a href="#getInstance" title="details" class="method-name">getInstance</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">false</span>])
									</div>
																																
												<div class="method-definition">
											<span class="method-result">ContentAreas</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#addArea" title="details" class="method-name">addArea</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$page_id</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$content</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#areas" title="details" class="method-name">areas</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$name</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$name,</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#deleteWidget" title="details" class="method-name">deleteWidget</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$area_name</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$widget_id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getContent" title="details" class="method-name">getContent</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$page_id</span>)
									</div>
																								<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isRegistered" title="details" class="method-name">isRegistered</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#widgetContent" title="details" class="method-name">widgetContent</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$widget_name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$area_name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$area</span> = <span class="var-default">'all'</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#widgets" title="details" class="method-name">widgets</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$name</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$name,</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method getInstance</span> (line <span class="line-number">135</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">getInstance</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">instance</span>
		<span class="method-name">
			getInstance
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: , true if new instance should be made</span>			</li>
				</ul>
		
			
	</div>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">84</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">__construct</p>
<p class="description"><p>sets up the class, fetches content area  info from the db</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">ContentAreas</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodaddArea" id="addArea"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addArea</span> (line <span class="line-number">221</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">addArea</p>
<p class="description"><p>adds an area to the content areas database  if the area exists it adds a new page to the  $content</p><p>note: if area exists, page id is added to content but  data is not altered</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			addArea
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$page_id</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$content</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$page_id</span><span class="var-description">: or int $page_id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodareas" id="areas"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">areas</span> (line <span class="line-number">270</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">areas</p>
<p class="description"><p>returns the array of registered content areas</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			areas
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$name</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$name,</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name,</span><span class="var-description">: optional</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddeleteWidget" id="deleteWidget"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">deleteWidget</span> (line <span class="line-number">250</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">deleteWidget</p>
<p class="description"><p>deletes a widget from a content area</p></p>
	<ul class="tags">
				<li><span class="field">todo:</span> expand beyond 'all'</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			deleteWidget
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$area_name</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$widget_id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$area_name</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$widget_id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetContent" id="getContent"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getContent</span> (line <span class="line-number">184</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">getContent</p>
<p class="description"><p>gets the content of the given content area for  this page and returns it</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> or bool</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getContent
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$page_id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$page_id</span>			</li>
				</ul>
		
			
	</div>
<a name="methodisRegistered" id="isRegistered"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isRegistered</span> (line <span class="line-number">166</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">isRegistered</p>
<p class="description"><p>returns true if content area is registered, else false</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isRegistered
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodwidgetContent" id="widgetContent"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">widgetContent</span> (line <span class="line-number">313</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">widgetContent</p>
<p class="description"><p>returns the content of a widget</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			widgetContent
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$widget_name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$area_name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$area</span> = <span class="var-default">'all'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$widget_name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$area_name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$area</span><span class="var-description">: optional</span>			</li>
				</ul>
		
			
	</div>
<a name="methodwidgets" id="widgets"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">widgets</span> (line <span class="line-number">289</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">widgets</p>
<p class="description"><p>returns an array of widgets or if name is supplied  returns info on one widget</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			widgets
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$name</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$name,</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name,</span><span class="var-description">: optional</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 07 Jun 2012 18:22:45 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>